#!/bin/bash -e

vendor_dir=$GOPATH/src/gitee.com/kwbasedb/kwbase/vendor/github.com/pingcap
mkdir -p ${vendor_dir}
rm -rf $GOPATH/src/gitee.com/kwbasedb/kwbase/vendor/github.com/pingcap/failpoint
unzip failpoint.zip -d ${vendor_dir}
mkdir -p  $GOPATH/src/gitee.com/kwbasedb/kwbase/pkg/sql/failpoint/
cp -rf ./failpoint/* $GOPATH/src/gitee.com/kwbasedb/kwbase/pkg/sql/failpoint/

cd ${vendor_dir}/failpoint/
make
cd -
